#ifndef ANIMATION_H
#define ANIMATION_H

#include <SFML/Graphics.hpp>

class Animation
{
	public:
		Animation();
		~Animation();

		void Initialize(std::string sheetPath, sf::Vector2f cellSize, int cellCount, int fps, int row);
		void Initialize(sf::Texture* image, sf::Vector2f cellSize, int cellCount, int fps, int row);
		void Update(float deltaTime);
		void Cleanup();

		sf::Sprite* GetSprite();
		float m_updateRate;
		int m_cellCount;
		int m_currentCell;
		int m_currentRow;
		int m_row;
		void SetCurrentCell_Vertical();
	
	private:
		sf::Texture* m_image;
		sf::Sprite* m_sprite;
		sf::Vector2f m_cellSize;
		
		float m_timeSinceUpdate;

		void SetCurrentCell();
		
};

#endif ANIMATION_H
